package se.webbzon.boltzmann.battle.property;

import se.webbzon.boltzmann.factory.AbstractFactory;
import se.webbzon.boltzmann.resource.Resources;
import se.webbzon.oschi01.textureset.Texture3D;

public abstract class BattlePropertyFactory extends AbstractFactory<String,BattleProperty,Object> {
	
	// The name of the battle property factory
	private final String factoryName;
	
	// An optional texture sample of the battle property factory
	private final Texture3D textureSample;
	
	/*============================================================
	Constructors
	============================================================*/
	
	/** Creates a new battle property factory with a given name. **/
	public BattlePropertyFactory(String factoryName) {
		this(factoryName,Resources.getTextureSet("misc_unknown").get(0));
	}
	
	/** Creates a new battle property factory with a given name and
	 * a given texture sample. **/
	public BattlePropertyFactory(String factoryName, Texture3D textureSample) {
		this.factoryName = factoryName;
		this.textureSample = textureSample;
	}
	
	/*============================================================
	Public Methods
	============================================================*/
	
	/** Returns the name of the battle property factory. **/
	public String getName() {
		return factoryName;
	}
	
	/** Returns a texture sample used to show the content of the 
	 * battle property factory. **/
	public Texture3D getTextureSample() {
		return textureSample;
	}
	
	@Override public String getKey() {
		return factoryName;
	}

}
